package ruifight.member.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import ruifight.member.dao.ClassifyInfoMapper;
import ruifight.member.model.ClassifyInfo;
import ruifight.member.model.ClassifyInfoExample;
import ruifight.member.service.ClassifyInfoService;
import ruifight.member.service.base.BaseServiceImpl;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class ClassifyInfoServiceImpl extends BaseServiceImpl<ClassifyInfo, ClassifyInfoExample, Long> implements ClassifyInfoService {

    @Resource
    private ClassifyInfoMapper classifyInfoMapper;

    public PageInfo<Map<String, Object>> getClassifyInfoList(int cur_page, int page_size, Map<String, Object> paramMap){
        PageHelper.startPage(cur_page, page_size);
        List<Map<String, Object>> pageList = classifyInfoMapper.getClassifyInfoList(paramMap);
        PageInfo<Map<String, Object>> pageInfo = new PageInfo<Map<String, Object>>(pageList);
        return pageInfo;
    }

    public List<ClassifyInfo> getClassifyAndTagInfoList( Map<String, Object> paramMap){
        return classifyInfoMapper.getClassifyAndTagInfoList(paramMap);
    }
}
